while True:
    S = input("").strip()
    line = input("").strip()
    if S.isdigit():
        S = int(S)
        if 0 <= S <= 1000000000:
            line = line.split(" ")
            a = line[0]
            b = line[1]
            c = line[2]
            d = line[3]
            e = line[4]
            if type(a) = int:
                if type(b) = int():
                    if type(c) = int():
                        if type(d) = int():
                            if type(e) = int():
